home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
src
/
X11
/
tclMotif-1.4
/
programs
/
address
next >
Wrap
Text File
|
1995-06-29
|
2KB
|
60 lines
#!../src/moat
xtAppInitialize
# widgets
xmMainWindow .main managed
xmForm .main.form managed
xmList .main.form.list managed \
-selectionPolicy single_select
xmLabel .main.form.Name managed \
-alignment alignment_end
xmLabel .main.form.Telephone managed \
-alignment alignment_end
xmText .main.form.name managed
xmText .main.form.telephone managed
# geometry
.main.form.list setValues \
-topAttachment attach_form \
-leftAttachment attach_form \
-bottomAttachment attach_form
.main.form.Name setValues \
-topAttachment attach_form \
-leftAttachment attach_widget \
-leftWidget .main.form.list \
-rightAttachment attach_opposite_widget \
-rightWidget .main.form.Telephone
.main.form.Telephone setValues \
-topAttachment attach_position \
-topPosition 50 \
-leftAttachment attach_widget \
-leftWidget .main.form.list
.main.form.name setValues \
-topAttachment attach_form \
-rightAttachment attach_form \
-leftAttachment attach_widget \
-leftWidget .main.form.Name
.main.form.telephone setValues \
-topAttachment attach_position \
-topPosition 50 \
-rightAttachment attach_form \
-leftAttachment attach_widget \
-leftWidget .main.form.Telephone
# set values in List
.main.form.list setValues \
-items {"Jan Newmarch" "John Ousterhout" "Stephen Prendergast"} \
-itemCount 3
# add a callback
.main.form.list singleSelectionCallback {
.main.form.name setValues \
-value "%item"
}
# set it going
. realizeWidget
. mainLoop